<template>
  <div>
    <!-- 详情  -->
    <div class="detail-container" id="mainScroll" v-if="!showFeed">
      <div class="detail-content hairline-bottom item-card ">
        <div class="content"><a class="subject-link" @click.stop="goSubject(photoDetail.subjectId)">{{photoDetail.subjectName}}</a><span class="detail-content-com" v-html="photoDetail.content"></span>
        </div>
        <ul class="img-box">
          <li v-for="(photo,index)  in photoDetail.photos"  :class="{'nogap': (index+1) % 3 == 0}" @click.stop="bigImg( index )" :style="'background-image:url('+photo.fileUrl | thumbnail('_216_2048_100_0')+')'">
          </li>
        </ul>
        <p class="location">
          <span>
            <i class="icon icon-location" v-if="photoDetail.location"></i>{{photoDetail.location}}</span>
          <span class="creatTime" v-text="photoDetail.createTime"></span>
        </p>
      </div>
<!--去掉限制只能看到自己发布的处理过程 v-if="photoDetail.author"-->
      <div class="process-content hairline-bottom  feedBackList">
        <p class="title  hairline-bottom">处理过程</p>
        <ul>
          <li v-if="photoDetail.dealProcess && photoDetail.dealProcess.length == 0">
            <p class="feedTime ">客服正在处理中，请耐心等待</p>
          </li>
          <li v-for="item in photoDetail.dealProcess">
            <p class="feedTime ">{{item.createTime}}</p>
            <p>{{item.handleChannel}}</p>
            <p>{{item.handleResult}}</p>
          </li>
        </ul>
      </div>
      <!-- feedback  用户反馈,0:未反馈，1.用户确认未解决，2.用户确认解决 -->
      <!-- dealStatus 处理状态 -->
      <div class="btn-group" v-if="photoDetail &&  photoDetail.feedback<1 && photoDetail.dealStatus==2 && photoDetail.author">
        <span class="btn" @click="showFeedBox(true)">不满意</span>
        <span class="btn" @click="userFeedBack(2)">满意</span>
      </div>

      <div id="more" data-gap="100"></div>
    </div>
    <!-- 详情  -->
    <!-- 反馈 -->
    <!--<div class="feedback-box" v-if="showFeed">-->
      <!--<div class="feedback">-->
        <!--<textarea v-model="feedContent" name="" maxlength="200" placeholder="请填写您的意见..."></textarea>-->
        <!--<p class="limit-box">-->
          <!--<span>{{feedContent | textLength }}/200</span>-->
        <!--</p>-->
      <!--</div>-->
      <!--<div class="btn-groups">-->
        <!--<div class="cancel-btn" @click="showFeedBox(false)">取消</div>-->
        <!--<div class="submit-btn" @click="userFeedBack(1)">确定</div>-->
      <!--</div>-->
    <!--</div>-->
    <!-- 反馈 -->

    <!--放大图片-->
    <img-view :photoList="photoDetail.photos" :curIndex="curPhotoIndex" v-model="imgSwitch" @reset="reset"></img-view>
  </div>
</template>

<script>
  import detail from './detail-report';
  export default detail;
</script>



<style scoped >
  /*反馈*/

  .main {
    position: absolute;
    width: 100%;
    height: 100%
  }

  .feedBackList {
    padding: 15px 0 15px 15px;
    background: #fff;
  }

  .feedBackList .title {
    padding-bottom: 15px
  }

  .feedBackList ul {
    padding-top: 15px;
    padding-left: 16px
  }

  .feedBackList ul li {
    padding-bottom: 15px;
    position: relative
  }

  .feedBackList ul li::after {
    position: absolute;
    content: "";
    height: 100%;
    width: 1px;
    background: #DDDEE3;
    top: 8px;
    left: -12.5px
  }

  .feedBackList ul li:nth-last-child(1)::after {
    background: transparent;
  }

  .feedBackList ul li .feedTime {
    font-size: 13px;
    color: #8E8E93;
    position: relative
  }

  .feedBackList ul li .feedTime::after {
    position: absolute;
    content: "";
    height: 7px;
    width: 7px;
    border-radius: 50%;
    background: #DDDEE3;
    top: 8px;
    left: -15px
  }

  .feedBackList ul li p {
    font-size: 15px;
    color: #000;
    line-height: 24px;
  }

  .btn-group {
    padding-left: 15px;
    font-size: 0;
    margin: 16px 0 16px 0;
    padding-bottom: 50px
  }

  .btn-group span {
    display: inline-block;
    background: #DF3031;
    border-radius: 4px;
    font-size: 17px;
    color: #FFF;
    line-height: 39px;
    width: 165px;
    text-align: center;
    margin-right: 15px
  }

  /*专题*/
  a.subject-link{
    color: #12418E;
  }

  /** 详情 **/

  .item-card {
    margin-top: 10px;
  }

  .detail-content {
    background: #fff;
    padding-bottom: 0;
    width: 100%;
  }

  .img-box {
    line-height: 0;
    font-size: 0;
    padding: 0 15px;
  }

  .img-box ul {
    overflow: hidden;

  }

  .img-box li {
    background-color: #eee;
    width: 113px;
    height: 113px;
    display: inline-block;
    margin-right: 3px;
    margin-bottom: 3px;
    overflow: hidden;
    background-position: center;
    background-size: cover;
  }

  .img-box li.nogap {
    margin-right: 0;
  }

  .img-box img {
    opacity: 0
  }

  .content {
    font-size: 15px;
    color: #222222;
    line-height: 23px;
    padding: 15px 15px 10px;
  }

  .location {
    font-size: 15px;
    padding: 20px 19px;
    line-height: 18px;
    height: 57px;
  }

  .icon-location {
    background-image: url(../img/icon-location.png);
    width: 17px;
    height: 17px;
    float: left;
    margin-right: 5px;
  }

  .location span {
    max-width: 240px;
    display: inline-block;
    text-overflow: ellipsis;
    -webkit-text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    font-size: 15px;
    color: #000000;

  }

  .location .creatTime {
    float: right;
    font-size: 13px;
    color: #8E8E93;
  }

  /* 反馈 */
  .feedback {
    padding: 15px 15px 20px;
  ;
    height: 217px;
    background: #fff;
  }

  textarea {
    width: 100%;
    height: 160px;
    font-size: 18px;
    letter-spacing: 0;
    line-height: 26px;
    resize: none;
  }

  .limit-box {
    text-align: right;
    font-size: 14px;
    color: #8E8E93;
  }

  .btn-groups {
    margin-top: 30px;
    overflow: hidden;
    padding: 0 15px;
  }

  .cancel-btn, .submit-btn {
    width: 165px;
    line-height: 39px;
    text-align: center;
  }
  .cancel-btn {
    float: left;
    background: #FFFFFF;
    border: 1px solid #DF3031;
    border-radius: 4px;
    font-size: 17px;
    color: #DF3031;
    margin-right: 15px;
  }

  .submit-btn {
    float: left;
    background: #DF3031;
    border-radius: 4px;
    font-size: 17px;
    color: #FFFFFF;
  }
</style>


